package cn.comtom.ewbs.signature.common.utils;

import java.util.List;

import com.google.common.collect.Lists;

import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.StrUtil;

public class SignUtil {
	
	public static void main(String[] args) {
		List<String> readUtf8Lines = FileUtil.readUtf8Lines("F:/data.txt");
		List<String> lines = Lists.newArrayList();
		for (String line : readUtf8Lines) {
			if(line.contains("SIGN_LIST")) {
				lines.add("RET_OK");
				String SMSN = StrUtil.subBetween(line, "&opt=reg&SMSN=", "=>");
				String data = StrUtil.subAfter(line, "=>", false);
				data =data.replaceFirst("000000000001", SMSN);
				lines.add(data);
			}
		}
		FileUtil.writeUtf8Lines(lines, "F:/data1.txt");
	}
}
